home *** CD-ROM | disk | FTP | other *** search
/ Hyper Stacks 1994 May / Hyper Stacks (Pacific HiTech)(1994)[Mac].iso / Utilities / HC 21 Tech Notes < prev    next >
Internet Message Format  |  1991-09-25  |  24KB

  1. From: strick@slcs.slb.com
  2. Date: Fri, 28 Jun 91 11:39:57 CDT
  3. Subject: HyperCard 2.1 Release Notes (AppleEvents)
  4.  
  5. >  ... I see 'File Sharing Extension' and 'Finder' as two programs 
  6. >  apparently supporting events.  Where can I get docs on sending
  7. >  them events? 
  8.  
  9. I don't know about File Sharing Extension.  I do know about the Finder --
  10. the suite of Apple events that the 7.0 Finder understands will be
  11. published in the Apple Event Registry, a version of which will shortly
  12. be available from the Apple Programmers' and Developers' Association
  13. (APDA).  However, you'll need an XCMD to send these events to the
  14. Finder from HyperCard 2.1.
  15.  
  16. >  Can you give me a HyperTalk string that will send an event to the
  17. >  Finder on another (7.0 w/linking) Mac that will tell it to launch
  18. >  HyperCard?  If I can get HC running then I can use it to launch
  19. >  other Apps and such, but I'm guessing I should be able to tell the
  20. >  finder to oapp HyperCard?
  21.  
  22. Unfortunately, the Finder does not accept standard open events from
  23. remote machines -- I believe that this decision was made by the 7.0
  24. team to make the whole program linking scheme more secure from
  25. viruses.  Therefore there is no way at present to launch an app on
  26. a remote machine from HyperCard, unless HyperCard or some other
  27. app that can sublaunch things is running on that machine.  I can
  28. only recommend two things:
  29.  
  30.   - Put HyperCard in the Startup Items folder in the System Folder.
  31.     This will make it launch automatically when the machine boots.
  32.  
  33.   - Find or write a nice small utility app that can accept some
  34.     of the standard Apple events from remote machines and put it
  35.     in the Startup Items folder.
  36.  
  37. Here, as promised, are the articles I posted to comp.sys.mac.hypercard.
  38.  
  39. -----
  40.  
  41.  
  42. HyperCard 2.1 Release Notes
  43.  
  44.  
  45. Overview of this Release
  46. ------------------------
  47.  
  48. HyperCard 2.1 is the version of HyperCard recommended for use with System
  49. 7.0. It is also compatible with System 6.0.5 and System 6.0.7.
  50.  
  51.  
  52. Revisions for Support of System 7.0 Features
  53. --------------------------------------------
  54.  
  55. These revisions are grouped by their associated Toolbox Manager.
  56.  
  57.  
  58. Alias Manager
  59.  
  60.     When the Alias Manager is present, HyperCard 2.1 will call it to
  61. resolve alias files.  Therefore, the following commands will work properly
  62. with alias files.
  63.  
  64.     go to stack <alias file>
  65.     open <alias file> with <alias file>
  66.     open file <alias file>
  67.     write to file <alias file>
  68.     read from file <alias file>
  69.     picture <alias file>
  70.  
  71.     The XCMD callback GetFilePath will also resolve alias files.
  72. Therefore, XCMDs that use this callback to locate files will require no
  73. revision to work with alias files.  (The Picture XCMD is an example.)
  74.  
  75.     In addition, if HyperCard finds an alias file when looking for the Home
  76. stack on startup, the alias file will be resolved.
  77.  
  78.  
  79. Apple Event Manager
  80.  
  81.     When the AppleEvent Manager is present, HyperCard 2.1 will use it to
  82. process and send Apple events.  HyperCard will recognize and handle the
  83. standard Apple events for opening documents, printing documents, quitting,
  84. executing a script, and evaluating an expression.
  85.  
  86.     In addition, several of HyperTalk's built-in commands will have the
  87. added ability to send specific Apple events to other applications.
  88.  
  89.     Event class  Event ID       Related HyperTalk command
  90.     -----------  --------       -------------------------
  91.     'aevt'       'oapp'         open <application>
  92.     'aevt'       'odoc'         open <document> with <application>
  93.     'aevt'       'pdoc'         print <document> with <application>
  94.     'aevt'       'quit'         close <application>
  95.     'aevt'       'clos'         close <document> with <application>
  96.     'misc'       'dosc'         send <expr> to program <programExpr>
  97.     'misc'       'eval'         request <expr> of program <programExpr>
  98.  
  99.     If you want to launch another application or open a document with
  100. another application, use the HyperTalk command "open".  If you want to
  101. print a document with another application, use the command "print".  If you
  102. want to close a document in another application or quit another
  103. application, use the command "close".  If you want to execute a script or
  104. macro in another application, use the HyperTalk command "send".  If you
  105. want to evaluate an expression in another application, use the command
  106. "request".
  107.  
  108.     Please note that among these Apple events, only 'oapp', 'odoc', 'pdoc',
  109. and 'quit' are universally supported.  All other Apple events that
  110. HyperCard can send will be effective only if the target application
  111. includes specific support for them. For example,
  112.  
  113.     close "My Expense Report" with "FabCalc"
  114.  
  115. will work properly only if the application FabCalc supports the 'clos'
  116. Apple event.
  117.  
  118.     The "open", "print", and "close" commands will work only with
  119. applications that reside on the same machine as HyperCard.  The "send" and
  120. "request" commands will work with any linkable program running on the
  121. network. See "Determining the Target Program", below.
  122.  
  123. Sending scripts to other programs
  124.  
  125.     The send command in HyperTalk will send a "do script" Apple event from
  126. HyperCard to another application running remotely.  It can be used to send
  127. a script to any program that understands the standard 'dosc' Apple event.
  128. By default, HyperCard waits for a reply from the target program before
  129. continuing. However, you can specify that you don't want to wait for a
  130. reply.
  131.  
  132.     Examples:
  133.  
  134.     send "make waves" to program "De Anza 6/2nd:WildCraft:HyperCard"
  135.     send "build {project}" to program "MPW Shell" without reply
  136.  
  137. Evaluating expressions in other programs
  138.  
  139.     The request command in HyperTalk will send an "evaluate expression"
  140. Apple event from HyperCard to another application running remotely.  It can
  141. be used to send an expression to any program that understands the standard
  142. 'eval' Apple event.  The value of the expression will be put into the local
  143. variable "it".
  144.  
  145.     Examples:
  146.  
  147.     request "the name of this stack" of program "HyperCard"
  148.     request "{target}" from program "MPW Shell"
  149.  
  150. Handling failures
  151.  
  152.     The "send", "open", "print", "close", and "request" commands set "the
  153. result" as follows when they fail.
  154.  
  155. Condition                               the result
  156. ---------                               ---------------
  157. User canceled the "Link to program"     "Cancel"
  158.   dialog.
  159. Target program didn't handle event.     "Not handled by target program"
  160. Target program timed out.               "Timeout"
  161. Target program returned error string    the string
  162.   in reply.
  163. Target program returned error number    "Got error <errorNum>
  164.   in reply, or AESend returned some       when sending Apple( event"
  165.   other error.
  166.  
  167. Establishing program links
  168.  
  169.     When sending Apple events to another program, if HyperCard has not
  170. established a link with the target program, the user will be presented with
  171. a dialog, through which the link will be established.  If a link has
  172. already been established between HyperCard and the target program, the
  173. Apple event will be sent without further user interaction.
  174.  
  175. Determining the target program
  176.  
  177.     The target program for Apple events is specified by a string in the
  178. following format:
  179.  
  180.     zone:machine:program
  181.  
  182.     Examples:
  183.  
  184.     "Fifth Floor:Gizmo:MacWrite"
  185.     "Baby mac:MacWrite"
  186.         -- zone omitted; HyperCard assumes same zone
  187.     MacWrite
  188.         -- zone and machine omitted; HyperCard assumes same zone,
  189.             same machine
  190.  
  191.     HyperCard's address on the network is contained in the property, "the
  192. address".
  193.  
  194.     You can use the itemDelimiter property to parse program addresses.
  195. For example, given a string that specifies a target program, the following
  196. HyperTalk function will return the name of the program if you send it a
  197. colon as the delimiter and the string as the text.
  198.  
  199.     function lastHCItem delim,theText
  200.       put the itemDelimiter into savedDelimiter
  201.       set the itemDelimiter to delim
  202.       put the last item of theText into lastItem
  203.       set the itemDelimiter to savedDelimiter
  204.       return lastItem
  205.     end lastHCItem
  206.  
  207. Choosing a target program
  208.  
  209.     The answer command has been extended for use with the Program Linking
  210. dialog, so that scripters can allow users to select a program to link to.
  211.  
  212.     answer program prompt { of type <factorList> }
  213.  
  214. When used in this way, the answer command displays the PPC browser, from
  215. which the user can select any program running on any machine connected to
  216. the AppleTalk network.  A string representing the program the user selects
  217. is placed into the local variable "it".
  218.  
  219. Examples:
  220.  
  221.     answer program "Where did you say that program was again?"
  222.     answer program "Choose a spelling checker:" of type "Spellcheck"
  223.  
  224.     In addition,  a scripter can determine which programs are running on
  225. the same machine as HyperCard by examining the new HyperTalk function, "the
  226. programs".  It returns a return-delimited list of all the linkable programs
  227. currently running on the same machine as HyperCard.
  228.  
  229. Handling Apple events
  230.  
  231.     When HyperCard receives an Apple event, it will send a new HyperTalk
  232. system message, "appleEvent", to the current card, along with parameters
  233. that enable a script to determine the class, id, and the sender of the
  234. Apple event.  For example, when the Finder sends HyperCard an Apple event
  235. of class 'aevt' and id 'odoc', HyperCard sends the HyperTalk message
  236. "appleEvent aevt,odoc,Finder" to the current card.
  237.  
  238.     A script that handles an appleEvent message can gather the parameters
  239. of the Apple event by using the new HyperTalk command "request".
  240.  
  241.     request appleEvent data { [ of | with ] keyword <expr> }
  242.  
  243. This command puts the parameter or attribute with the specified keyword
  244. into the local variable "it".  For example, you can obtain a parameter of
  245. keyword "errs", the standard Apple event keyword for an error string, as
  246. follows:
  247.  
  248.     request appleEvent data with keyword "errs"
  249.     put it into errorString
  250.  
  251. If there is no attribute or parameter with the keyword you specify,
  252. HyperCard sets the result to "Not found".
  253.  
  254.     If you don't supply a keyword, HyperCard assumes you're requesting the
  255. direct object of the Apple event, which is defined by the Apple event
  256. manager as the parameter with keyword "----".  The request command also
  257. supports several special cases for important attributes of Apple events:
  258.  
  259.     request appleEvent class
  260.     request appleEvent id
  261.     request appleEvent sender
  262.     request appleEvent return id
  263.  
  264.     HyperCard will attempt to convert all the Apple event parameters to
  265. strings, for use in HyperTalk.  The Apple event manager automatically
  266. handles the conversion of numerical forms to strings; HyperCard installs
  267. coercion handlers for alias records, return ids, process serial numbers,
  268. target ids, class and id types, and lists.
  269.  
  270.     If an incoming Apple event specifies that user action is not
  271. permissible, the global property lockErrorDialogs will automatically be set
  272. to TRUE (see "Error Handling", below).  The scripter can override this
  273. setting.
  274.  
  275.     Example:  a scripter defines an event of class 'WILD' and id 'cnvt' as
  276. a request to convert a 1.2.5 stack to the 2.0 file format.  The direct
  277. object of the Apple event is defined to be the pathname of the stack.  The
  278. following script will do the trick.
  279.  
  280.     on appleEvent eventClass,eventID,sender
  281.       if eventClass & eventID is not "WILDcnvt"
  282.       then pass appleEvent
  283.       else
  284.         request appleEvent data
  285.         if it is empty then exit appleEvent
  286.         go to stack it
  287.         if the result is not empty then exit appleEvent
  288.  
  289.         if there is a menuItem "Convert Stack..." in menu "File"
  290.         then doMenu "Convert Stack..." without dialog
  291.       end if
  292.     end appleEvent
  293.  
  294.     Example:  when a stack is opened from the Finder while HyperCard is
  295. running, HyperCard 2.1 will open the stack in a new window.  This behavior
  296. is different from previous versions of HyperCard, which would go to the
  297. stack in the currently active window.  If you prefer the old behavior, you
  298. can put the following script in your Home stack.
  299.  
  300.     on appleEvent eventClass,eventID,sender
  301.       if eventClass & eventID is not "aevtodoc"
  302.       then pass appleEvent
  303.       else
  304.         request appleEvent data
  305.         put line 1 of it into stackToOpen
  306.         go to stack stackToOpen
  307.       end if
  308.     end appleEvent
  309.  
  310.     If HyperCard receives the appleEvent message, either because it was not
  311. intercepted by a script or because it was passed to it by a script,
  312. HyperCard will check whether the current Apple event is of the types it
  313. knows how to respond to, and if so, will treat it appropriately.  HyperCard
  314. 2.1 will recognize the following standard Apple events: 'odoc', 'pdoc',
  315. 'quit', 'dosc', and 'eval'.
  316.  
  317.     HyperCard responds to the 'odoc' event by checking whether the
  318. specified files are stacks and, if so, opening them, each in a new window.
  319.  
  320.     HyperCard responds to the 'pdoc' event by checking whether the
  321. specified files are stacks and, if so, opening them one at a time in a new
  322. window, printing them, and closing them again.
  323.  
  324.     HyperCard responds to the 'quit' event just as it would if "Quit
  325. HyperCard" were chosen from the File menu.
  326.  
  327.     HyperCard responds to a 'dosc' event by compiling and executing the
  328. HyperTalk statements sent to it as the direct object of the event.
  329.  
  330.     HyperCard responds to an 'eval' event by evaluating the expression sent
  331. to it as the direct object of the event and putting the value into the
  332. direct object of the reply.
  333.  
  334. Replying to Apple events
  335.  
  336.     Scripters can reply to Apple events from HyperTalk with a new command,
  337. "reply".
  338.  
  339.     reply <expr> { with keyword <expr> }
  340.  
  341. If you don't specify a keyword for the reply parameter, the parameter will
  342. become the direct parameter of the reply.  If you wish to return an error
  343. string, you can use the following form of the reply command:
  344.  
  345.     reply error <expr>
  346.  
  347. This is equivalent to:
  348.  
  349.     reply <expr> with keyword "errs"
  350.  
  351.     The reply event is sent when the chain of execution is complete.
  352.  
  353.     For example, the following script will handle Apple events of class
  354. 'WILD' and type 'defn' by searching for a string in a background field
  355. named "Glossary Entry" and returning the contents of a background field
  356. named "Definition".
  357.  
  358.     on appleEvent eventClass,eventID,sender
  359.       if eventClass is "WILD" and eventID is "defn" then
  360.         request appleEvent data
  361.         find it in field "Glossary Entry"
  362.         if the result is empty  -- successful find
  363.         then reply field "Definition"
  364.         else reply error "Not found"
  365.       else pass appleEvent
  366.     end appleEvent
  367.  
  368. The "request" and "reply" commands set the result to "No current Apple(
  369. event." when there is no current Apple event to handle.
  370.  
  371.  
  372. Miscellaneous Revisions
  373. -----------------------
  374.  
  375. Menus
  376.  
  377.     When you ask for the names of the Apple, Help, and Application menus
  378. >From HyperTalk, you get "Apple", "System Help", and "Application",
  379. respectively.
  380.  
  381. Error Handling
  382.  
  383.     In order to execute scripts without interaction with the user, as well
  384. as to provide a better means for testing HyperCard's error messages, it's
  385. now possible to lock error dialogs and to put HyperTalk into a "quiet
  386. mode" for script execution.  When HyperTalk encounters an error while in
  387. "quiet mode", it aborts execution of pending scripts just as it normally
  388. would, but instead of displaying a dialog with an error message, it sends a
  389. "errorDialog" message to the current card with the error message as its
  390. parameter.  This message substitutes for the first "idle" message that
  391. would be sent in normal mode after HyperTalk cleans up and HyperCard
  392. returns to its main event loop.
  393.  
  394.     Example:
  395.  
  396.     set lockErrorDialogs to TRUE  -- puts HyperTalk into "quiet mode"
  397.     lock error dialogs  -- an alternate form
  398.     unlock error dialogs
  399.  
  400. When HyperCard receives an Apple event for which the sender has specified
  401. that no user interaction is allowed, it will automatically set
  402. lockErrorDialogs to TRUE before handling the event.
  403.  
  404. Determining which version of System Software is running
  405.  
  406.     A new function has been added to HyperTalk, "the systemVersion".  It
  407. returns the version of system software is running in a decimal string.  For
  408. example, it will return 6.07 instead of 6.0.7, to allow scripters to use it
  409. with HyperTalk's arithmetic operators.
  410.  
  411. Specifying Windows
  412.  
  413.     You can now refer to windows by number and by id as well as by name.
  414. Therefore, the following commands are now valid.
  415.  
  416.     get the id of the card window
  417.     set the loc of window 1 to 50,50
  418.     hide last window
  419.  
  420.     Both the Picture and Palette XCMDs now send the id of a newly created
  421. window as an additional parameter to its open message.  For example, after
  422. the Picture XCMD creates a new window, it sends the following message to
  423. the current card:
  424.    
  425.     openPicture <name of window>,<id of window>
  426.  
  427. Read and Write
  428.  
  429.     The HyperTalk "read" and "write" commands have been enhanced.  The
  430. following examples are now valid.
  431.  
  432.     read from file "Fred" at 100 for 12
  433.     read from file "Fred" until end  -- 'eof' works too
  434.     write myVar to file "Fred" at 200
  435.     write moreStuff to file "Fred" at end  -- 'eof' works too
  436.  
  437. In addition, the 16K limit on the amount of text that could be read at once
  438. has been removed.  If the amount of text you ask for won't fit in memory,
  439. HyperCard sets the result to "Not enough memory to read from file."
  440.  
  441. Getting the internal modem for the Portable to work with "dial"
  442.  
  443.     A new global property, "the dialingTime", has been added, especially
  444. for users of the internal modem for the Macintosh Portable.  It determines
  445. how long HyperCard waits, in ticks, after sending the dial string, before
  446. closing the serial connection with the modem.   The default is 180 (3
  447. seconds).
  448.  
  449. Owners
  450.  
  451.     Windows and cards now have an "owner" property.  For windows, the owner
  452. is determined as follows.
  453.  
  454.     Creator                   Owner
  455.     ----------                ----------
  456.     HyperCard                 "HyperCard"
  457.     desk accessory or driver  "System"
  458.     XCMD                      the name of the XCMD
  459.     anything else             "Unknown"
  460.  
  461.     The owner of a card is the name of its background.
  462.  
  463. More Parameters Available
  464.  
  465.     The parameters for the "start", "stop", and "set" commands are now
  466. available within overriding handlers.
  467.  
  468.  
  469. Summary
  470. -------
  471.  
  472.     New messages:  appleEvent, errorDialog
  473.     New commands:  request, reply
  474.     New functions:  programs(), systemVersion()
  475.     New properties:  the address, the itemDelimiter, the lockErrorDialogs,
  476. the dialingTime, the owner
  477.     New constants:  comma, colon
  478.  
  479.     Enhanced commands: open, print, close, send, read, write, answer, lock,
  480. unlock, set, start, stop
  481.  
  482.  
  483. -----
  484.  
  485.  
  486. When HyperCard 2.1 receives an Apple event, it sends an appleEvent
  487. message to the current card.  That means that you can respond to Apple
  488. events with HyperTalk scripts.  But before you try to write such scripts,
  489. there are some terms and conventions you should be familiar with.
  490.  
  491. The figure
  492. ----------
  493.  
  494. Apple events are like a package full of raw materials that arrive at a
  495. factory.  They have a return address on them -- in HyperTalk, a string of
  496. the form "Zone:Macintosh:Program".  They have an explanation of what their
  497. contents are for -- the class and id, which together consititute a verb,
  498. directing the receiver what do to with the package.  And of course there
  499. are the contents themselves -- the event parameters.
  500.  
  501. When you get one of these packages, you have to unpack it before you can
  502. make something out of the raw materials inside.  But you can't just rip
  503. into the package willy-nilly.  You have to ask for what you want, by name.
  504. "Give me the snod." "OK, now give me the lerd."  You unpack the contents,
  505. one by one, and make out of them whatever you're directed to make by the
  506. class and id.
  507.  
  508. The catch is that the package doesn't come with a packing list.  You're
  509. supposed to know what's in it -- you have a big book that tells you that
  510. whenever you get a package that you're supposed to make into a "wild plum",
  511. it's supposed to have a "bork", a "flam", and a "nitz" inside of it.  So
  512. you unpack the bork, the flam, and the nitz, and then you make the wild
  513. plum out of them and send it back.
  514.  
  515.     Apple event = package
  516.     class and id = terse directions for what to do with the package
  517.     parameters = contents of the package
  518.     keywords = names for each thing in the package
  519.  
  520.  
  521. The lesson
  522. ----------
  523.  
  524. In HyperTalk, when you handle the appleEvent message, you first look at
  525. the class and id, and they tell you what you're supposed to do with the
  526. event.  If it's an event that you know how to handle, you already know what
  527. the parameters are -- you've agreed with the sender in advance on what's
  528. supposed to be in it, or it's a standard Apple event defined in the
  529. voluminous standard documentation.  So you unpack the parameters with the
  530. "request" command, manipulate them, and send back what you made out of them
  531. with the "reply" command.
  532.  
  533. The script might look like this:
  534.  
  535.    on appleEvent class,id,sender
  536.      if class & id is "wildplum" then
  537.        request ae data with keyword "bork"
  538.        if the result is not empty then   -- probably "Not found"
  539.          reply error "Expected a bork but got none."
  540.          exit appleEvent
  541.        end if
  542.        put it into theBork
  543.        request ae data with keyword "flam"
  544.        .
  545.        .
  546.        .
  547.        .
  548.        get wildPlumMakingFunction(theBork,theFlam,theNitz)  -- process it
  549.        reply it  -- send back the reply
  550.      else pass appleEvent  -- we don't recognize this event; pass it on
  551.    end appleEvent
  552.  
  553.  
  554. Keywords
  555. --------
  556.  
  557. Think of a keyword for a piece of data in the package as its name -- it's
  558. the handle you need to pull it out of the package.  Asking for a parameter
  559. by keyword is the same as asking for a piece of raw material by name.
  560.  
  561. Keywords are arbitrary.  Whoever invents an Apple event makes them up, on
  562. the spot, out of the blue, to name the pieces of data that go along with
  563. the event.  The standard Apple events that have already been defined, along
  564. with the keywords for their required and optional parameters, are described
  565. in the Apple Event Registry.
  566.  
  567.  
  568. The direct object
  569. -----------------
  570.  
  571. Many Apple events arrive with just one piece of raw material in them, or
  572. one piece that's more important than the others.  By convention, this piece
  573. is given the keyword "----" and is referred to in the Apple event
  574. documenation as "the direct object" or "the direct parameter".  These are
  575. pretty ugly names, so in HyperTalk you can just call it the "data" and
  576. leave off the keyword specification -- HyperCard will know what you're
  577. talking about.
  578.  
  579.    request appleEvent data
  580.  
  581. This is equivalent to the following statement.
  582.  
  583.    request appleEvent data of keyword "----"
  584.  
  585. The direct object for the 'odoc' event is the list of documents to open.
  586. The direct object for the 'dosc' event is the script to execute.  And so
  587. on.
  588.  
  589.  
  590. Event attributes
  591. ----------------
  592.  
  593. Apple events come along with more than just an address, a verb, and pieces
  594. of data.  They also come with modifiers, or "attributes", which you can
  595. think of as "special handling instructions".  The class, id, and sender are
  596. all attributes also, but HyperCard gives you these automatically as
  597. parameters to the appleEvent message.  The timeout value, the transaction
  598. id, and the return id -- the identifier you put on the reply so that the
  599. sender knows, when his wild plum arrives, which package you made it out of
  600. -- are additional attributes.  If you need to look at these, the "request"
  601. command will let you.
  602.  
  603. You can get the return id,
  604.  
  605.    request appleEvent return id
  606.    request appleEvent data of keyword "rtid"  -- same thing, only uglier
  607.  
  608. the timeout value,
  609.  
  610.    request appleEvent data of keyword "timo"
  611.  
  612. the transaction id,
  613.  
  614.    request appleEvent data of keyword "tran"
  615.  
  616. and whatever else you think you need, as long as you know its keyword.  We
  617. have special forms of the request command for the class, id, sender, direct
  618. object, and return id -- for everything else, you have to tell HyperCard
  619. what you want by keyword.
  620.  
  621.    request appleEvent class   -- gives you the class attribute
  622.    request appleEvent id      -- gives you the id attribute
  623.    request appleEvent sender  -- gives you the sender attribute
  624.    request appleEvent data    -- gives you the direct object parameter
  625.    request appleEvent return id   -- gives you the return id attribute
  626.  
  627.  
  628.  
  629.